#include <stdio.h>

#define STDIN
//#define DEBUG

#define INFINITE 99999999

int v[21][21][21];
int a, b, c;


int w(int a, int b, int c)
{
#ifdef DEBUG
    printf("a: %d b: %d c: %d\n", a, b, c);
#endif

    if (v[a][b][c] != INFINITE)
        return v[a][b][c];

    if (a < b && b < c)
    {
        v[a][b][c-1] = w(a, b, c-1);
        v[a][b-1][c-1] = w(a, b-1, c-1);
        v[a][b-1][c] = w(a, b-1, c);
        v[a][b][c] = v[a][b][c-1] + v[a][b-1][c-1] - v[a][b-1][c];
        return v[a][b][c];
    }
    else
    {
        v[a-1][b][c] = w(a-1, b, c);
        v[a-1][b-1][c] = w(a-1, b-1, c);
        v[a-1][b][c-1] = w(a-1, b, c-1);
        v[a-1][b-1][c-1] = w(a-1, b-1, c-1);
        return v[a-1][b][c] + v[a-1][b-1][c] + v[a-1][b][c-1] - v[a-1][b-1][c-1];
    }
}

void process()
{
    int i, j, k;
    for (i = 0; i < 21; ++i)
        for (j = 0; j < 21; j++)
            for (k = 0; k < 21; k++)
            {
                if (i == 0 || j == 0 || k == 0)
                    v[i][j][k] = 1;
                else
                    v[i][j][k] = INFINITE;
            }

    int result = 0;
    if (a <= 0 || b <= 0 || c <= 0)
    {
        result = w(0, 0, 0);
    }
    else if (a > 20 || b > 20 || c > 20)
    {
        result = w(20, 20, 20);
    }
    else
        result = w(a, b, c);

    
    printf("w(%d, %d, %d) = %d\n", a, b, c, result);
}

int main()
{
#ifdef STDIN
    freopen("bin/1579.in", "r", stdin);
#endif

    while(1)
    {
        scanf("%d %d %d", &a, &b, &c);
        if (a == -1 && b == -1 && c == -1)
            break;
        process();
    }


    return 0;
}
